﻿@model  NCP.Recruiting.WebApp.Models.CompanyFormModel
@Html.AntiForgeryToken()
<div id="wrap">
    <div class="wrapContents">
        <h1>
            账户设置</h1>
        <div class="tabMenus">
            <ul class="clearfix">
                <li class="tab_cur">企业资料</li>
                <li>照片</li>
            </ul>
        </div>
        <div>
            <div class="tab01" style="display: block;">
                @using (Html.BeginForm("Edit", "Company", FormMethod.Post, new { id = "SaveEdit", enctype = "multipart/form-data" }))
                {
                    @Html.HiddenFor(model => model.Id, Model.Id);
                    <div class="basicInfor">
                        <div class="basicInfor_title">
                            基本信息</div>
                        <div class="basicInfor_box">
                            <div class="basicInfor_box_top">
                                <div class="basicInfor_box_topLeft">
                                    <p>
                                        <font>*</font><label>单位名称：</label>@Html.TextBoxFor(model => model.CompanyName, new { Class = "unitName" })@Html.ValidationMessageFor(model => model.CompanyName)</p>
                                    <p>
                                        <font>*</font><label>行业类别：</label>@Html.DropDownListFor(model => model.Industry, Model.AvailableIndustres, "请选择", new { Class = "select_long" })@Html.ValidationMessageFor(model => model.Industry)</p>
                                    <p>
                                        <font>*</font><label>单位性质：</label>@Html.DropDownListFor(model => model.CompanyType, Model.AvailableCompanyTypes, "请选择", new { Class = "select_long" })@Html.ValidationMessageFor(model => model.CompanyType)</p>
                                    <p>
                                        <font>&nbsp;</font><label>营业执照：</label>@Html.TextBoxFor(model => model.BusinessLicense, new { Class = "license" })@Html.ValidationMessageFor(model => model.BusinessLicense)</p>
                                    <p>
                                        <font>&nbsp;</font><label>注册年份：</label>@Html.TextBoxFor(model => model.EstablishedOn, Model.EstablishedOn == null ? string.Empty : Convert.ToDateTime(Model.EstablishedOn).ToShortDateString(), new { id = "EstablishedOn", maxlength = "10", Class = "registered" })
                                        @Html.ValidationMessageFor(model => model.EstablishedOn)</p>
                                </div>
                                <div class="basicInfor_box_topRight">
                                    <div class="delete_logo">
                                        <p>
                                            LOGO:</p>
                                        <img src="/Company/GetLogoImage" alt="Logo" id="ComapnyLogo" width="181" height="81" />
                                        <span><a href="#" id="deletelogo">删除</a></span>
                                        <div class="cl">
                                        </div>
                                    </div>
                                    <div class="source">
                                        <em>来源：</em><input type="text" id="logosource" class="source_input" />
                                        <div class="Browse">
                                            <input type="file" name="logofile" id="logofile" class="fileA" />
                                            <div>
                                                浏览...</div>
                                        </div>
                                        <div class="cl">
                                        </div>
                                    </div>
                                    <div class="upload">
                                        <input type="submit" id="uploadlogo" class="btnbluecss" name="uploadlogo" value="上传" />
                                        
                                    </div>
                                </div>
                                <div class="cr">
                                </div>
                            </div>
                            <div class="basicInfor_box_bottom">
                                <p>
                                    <font>&nbsp;</font><label>注册资金：</label>@Html.TextBoxFor(model => model.RegisteredCapital, new { maxlength = 7, Class = "registered" })<em>万元</em>
                                    @Html.ValidationMessageFor(model => model.RegisteredCapital)</p>
                                <p>
                                    <font>*</font><label>员工人数：</label>@Html.TextBoxFor(model => model.Employees, new { Class = "registered" })@Html.ValidationMessageFor(model => model.Employees)<em>人</em></p>
                                <p>
                                    <font>*</font><label>所在省市：</label>@Html.DropDownListFor(model => model.Province, Model.ProvinceList, "请选择")@Html.DropDownListFor(model => model.City, Model.CityList, "请选择")</p>
                                <p>
                                    <font>*</font><label style="vertical-align: top;">单位介绍：</label>@Html.TextAreaFor(model => model.Overview)@Html.ValidationMessageFor(model => model.Overview)<br />
                                    <span>(不超过3000汉字字符或者英文字符)</span></p>
                            </div>
                        </div>
                    </div>
                    <div class="lxxx">
                        <div class="lxfs_title">
                            联系信息</div>
                        <div class="lxxx_box">
                            <div class="lxxx_box_form">
                                <p>
                                    <font>*</font><label>&nbsp;&nbsp;&nbsp;联系人：</label>@Html.TextBoxFor(model => model.Contact, new { Class = "input_short" })@Html.ValidationMessageFor(model => model.Contact)</p>
                                <p>
                                    <font>*</font><label>联系电话：</label>@Html.TextBoxFor(model => model.Tel, new { Class = "input_short" })@Html.ValidationMessageFor(model => model.Tel)<em>(仅供网站工作人员查看)</em></p>
                                <p>
                                    <font>*</font><label>移动电话：</label>@Html.TextBoxFor(model => model.Mobile, new { Class = "input_short" })@Html.ValidationMessageFor(model => model.Mobile)<em>(仅供网站工作人员查看)</em></p>
                                <p>
                                    <font>&nbsp;</font><label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;传真：</label>@Html.TextBoxFor(model => model.Fax, new { Class = "input_short" })@Html.ValidationMessageFor(model => model.Fax)</p>
                                <p>
                                    <font>&nbsp;</font><label>电子邮箱：</label>@Html.TextBoxFor(model => model.Email, new { Class = "input_long" })@Html.ValidationMessageFor(model => model.Email)</p>
                                <p>
                                    <font>&nbsp;</font><label>通讯地址：</label>@Html.TextBoxFor(model => model.Address, new { Class = "input_long" })@Html.ValidationMessageFor(model => model.Address)<strong>邮编：@Html.TextBoxFor(model => model.PostalCode, new { Class = "code_input" })@Html.ValidationMessageFor(model => model.PostalCode)</strong></p>
                                <p>
                                    <font>&nbsp;</font><label>公司首页：</label>@Html.TextBoxFor(model => model.WebSite, new { Class = "input_long", value = "http://" })@Html.ValidationMessageFor(model => model.WebSite)</p>
                            </div>
                            <div class="cl">
                            </div>
                        </div>
                    </div>
                }
            </div>
            <div class="tab01" style="display: none;">
                <div class="basicInfor">
                    <div class="basicInfor_title">
                        企业照片墙</div>
                    <div class="wallBox">
                        <div class="Photo_wall">
                            <ul class="clearfix">
                            @foreach(var img in Model.Photos)
                            {
                                <li id="@img.Id"><a href="#">
                                    <img src="/Company/GetImage?fileid=@img.Id" alt="" width="200" height="120" /></a>
                                    <p>
                                        <span>@img.Title</span> <a href="#">删除</a>
                                        <div class="cr">
                                        </div>
                                    </p>
                                </li>
                                }
                            </ul>
                        </div>
                        @using (Html.BeginForm("FileUpload", "Company", FormMethod.Post, new { id = "SaveImage", enctype = "multipart/form-data" }))
                        {
                            <div class="Photo_text">
                                @Html.HiddenFor(model => model.Id, Model.Id)
                                <div class="source">
                                    <em>照片：</em><input type="text" id="filewallurl" class="source_input" />
                                    <div class="Browse">
                                        <input type="file" id="filewall" name="filewall" class="fileA" />
                                        <div>
                                            浏览...</div>
                                    </div>
                                    <div class="cl">
                                    </div>
                                </div>
                                <div class="source">
                                    <em>标题：</em><input type="text" id="filewalltitle" name="filewalltitle" class="source_input" />
                                    <div class="cl">
                                    </div>
                                </div>
                                <div class="upload">
                                    <input type="submit" id="FileWallUpload" class="btnbluecss" value="上传" />
                                </div>
                            </div>
                        }
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
@Html.ValidationSummary(true)
